package com.southwind.mapper;

import com.southwind.entity.AdInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface AdInfoMapper extends BaseMapper<AdInfo> {

    @Select({"select u.name from sys_user u,ad_info s where s.uid = u.id and s.id = #{id} "})
    public String getUserNameById(Integer id);

    @Select({"select d.title from sys_user u,ad_info s,sys_dept d where s.uid = u.id and u.deptid = d.id and s.id = #{id} "})
    public String getDeptNameById(Integer id);

    @Select("select ad_info.ad_name from ad_info")
    List<String> selectName();
}
